import http from '../request'
/* 添加订单 */
export const saveOrder = (data) =>
    http({
        url: '/order',
        method: 'POST',
        data
    })
    /* 查询订单 */
export const queryOrder = (params) => http({ url: '/order', params })
    /* 支付 */
export const pay = (data) => http({ url: '/order/pay', method: 'POST', data })
    /* 取消 */
export const cancel = (data) =>
    http({
        url: '/order/cancel',
        method: 'POST',
        data
    })
    /* 删除订单 */
export const del = (data) =>
    http({
        url: '/order',
        method: 'DELETE',
        data
    })
    //根据订单id查询订单
export const queryOrderById = (id) => http({ url: '/order/' + id })
